home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / oleauto.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  9.1 KB  |  226 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1998 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'OleAuto.pas' rev: 3.00
  6.  
  7. #ifndef OleAutoHPP
  8. #define OleAutoHPP
  9. #include <SysUtils.hpp>
  10. #include <OleCtl.hpp>
  11. #include <OLE2.hpp>
  12. #include <Windows.hpp>
  13. #include <SysInit.hpp>
  14. #include <System.hpp>
  15.  
  16. //-- user supplied -----------------------------------------------------------
  17. #include <comobj.hpp>
  18.  
  19. namespace Oleauto
  20. {
  21. //-- type declarations -------------------------------------------------------
  22. typedef System::TMetaClass*TAutoClass;
  23.  
  24. enum TAutoClassInstancing { acInternal, acSingleInstance, acMultiInstance };
  25.  
  26. struct TAutoClassInfo
  27. {
  28.     System::TMetaClass*AutoClass;
  29.     System::AnsiString ProgID;
  30.     System::AnsiString ClassID;
  31.     System::AnsiString Description;
  32.     TAutoClassInstancing Instancing;
  33. } ;
  34.  
  35. class DELPHICLASS TRegistryClass;
  36. class PASCALIMPLEMENTATION TRegistryClass : public System::TObject 
  37. {
  38.     typedef System::TObject inherited;
  39.     
  40. private:
  41.     TRegistryClass* FNext;
  42.     System::TMetaClass*FAutoClass;
  43.     System::AnsiString FProgID;
  44.     GUID FClassID;
  45.     System::AnsiString FDescription;
  46.     TAutoClassInstancing FInstancing;
  47.     int FRegister;
  48.     
  49. public:
  50.     __fastcall TRegistryClass(const TAutoClassInfo &AutoClassInfo);
  51.     __fastcall virtual ~TRegistryClass(void);
  52.     void __fastcall UpdateRegistry(bool Register);
  53. };
  54.  
  55. enum TStartMode { smStandalone, smAutomation, smRegServer, smUnregServer };
  56.  
  57. typedef void __fastcall (__closure *TLastReleaseEvent)(bool &Shutdown);
  58.  
  59. class DELPHICLASS TAutomation;
  60. class PASCALIMPLEMENTATION TAutomation : public System::TObject 
  61. {
  62.     typedef System::TObject inherited;
  63.     
  64. private:
  65.     TRegistryClass* FRegistryList;
  66.     int FAutoObjectCount;
  67.     int FClassFactoryCount;
  68.     bool FIsInprocServer;
  69.     TStartMode FStartMode;
  70.     TLastReleaseEvent FOnLastRelease;
  71.     void __fastcall CountAutoObject(bool Created);
  72.     void __fastcall Initialize(void);
  73.     void __fastcall LastReleased(void);
  74.     
  75. public:
  76.     __fastcall TAutomation(void);
  77.     __fastcall virtual ~TAutomation(void);
  78.     void __fastcall RegisterClass(const TAutoClassInfo &AutoClassInfo);
  79.     void __fastcall UpdateRegistry(bool Register);
  80.     __property int AutoObjectCount = {read=FAutoObjectCount, nodefault};
  81.     __property bool IsInprocServer = {read=FIsInprocServer, write=FIsInprocServer, nodefault};
  82.     __property TStartMode StartMode = {read=FStartMode, nodefault};
  83.     __property TLastReleaseEvent OnLastRelease = {read=FOnLastRelease, write=FOnLastRelease};
  84. };
  85.  
  86. class DELPHICLASS EOleError;
  87. class PASCALIMPLEMENTATION EOleError : public Sysutils::Exception 
  88. {
  89.     typedef Sysutils::Exception inherited;
  90.     
  91. public:
  92.     /* Exception.Create */ __fastcall EOleError(const System::AnsiString Msg) : Sysutils::Exception(Msg
  93.         ) { }
  94.     /* Exception.CreateFmt */ __fastcall EOleError(const System::AnsiString Msg, const System::TVarRec 
  95.         * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  96.     /* Exception.CreateRes */ __fastcall EOleError(int Ident, Extended Dummy) : Sysutils::Exception(Ident
  97.         , Dummy) { }
  98.     /* Exception.CreateResFmt */ __fastcall EOleError(int Ident, const System::TVarRec * Args, const int 
  99.         Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
  100.     /* Exception.CreateHelp */ __fastcall EOleError(const System::AnsiString Msg, int AHelpContext) : Sysutils::
  101.         Exception(Msg, AHelpContext) { }
  102.     /* Exception.CreateFmtHelp */ __fastcall EOleError(const System::AnsiString Msg, const System::TVarRec 
  103.         * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
  104.         ) { }
  105.     /* Exception.CreateResHelp */ __fastcall EOleError(int Ident, int AHelpContext) : Sysutils::Exception(
  106.         Ident, AHelpContext) { }
  107.     /* Exception.CreateResFmtHelp */ __fastcall EOleError(int Ident, const System::TVarRec * Args, const 
  108.         int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext) { }
  109.     
  110. public:
  111.     /* TObject.Destroy */ __fastcall virtual ~EOleError(void) { }
  112.     
  113. };
  114.  
  115. class DELPHICLASS EOleSysError;
  116. class PASCALIMPLEMENTATION EOleSysError : public Oleauto::EOleError 
  117. {
  118.     typedef Oleauto::EOleError inherited;
  119.     
  120. private:
  121.     int FErrorCode;
  122.     
  123. public:
  124.     __fastcall EOleSysError(int ErrorCode);
  125.     __property int ErrorCode = {read=FErrorCode, nodefault};
  126. public:
  127.     /* Exception.CreateFmt */ __fastcall EOleSysError(const System::AnsiString Msg, const System::TVarRec 
  128.         * Args, const int Args_Size) : Oleauto::EOleError(Msg, Args, Args_Size) { }
  129.     /* Exception.CreateRes */ __fastcall EOleSysError(int Ident, Extended Dummy) : Oleauto::EOleError(Ident
  130.         , Dummy) { }
  131.     /* Exception.CreateResFmt */ __fastcall EOleSysError(int Ident, const System::TVarRec * Args, const 
  132.         int Args_Size) : Oleauto::EOleError(Ident, Args, Args_Size) { }
  133.     /* Exception.CreateHelp */ __fastcall EOleSysError(const System::AnsiString Msg, int AHelpContext) : 
  134.         Oleauto::EOleError(Msg, AHelpContext) { }
  135.     /* Exception.CreateFmtHelp */ __fastcall EOleSysError(const System::AnsiString Msg, const System::TVarRec 
  136.         * Args, const int Args_Size, int AHelpContext) : Oleauto::EOleError(Msg, Args, Args_Size, AHelpContext
  137.         ) { }
  138.     /* Exception.CreateResHelp */ __fastcall EOleSysError(int Ident, int AHelpContext) : Oleauto::EOleError(
  139.         Ident, AHelpContext) { }
  140.     /* Exception.CreateResFmtHelp */ __fastcall EOleSysError(int Ident, const System::TVarRec * Args, const 
  141.         int Args_Size, int AHelpContext) : Oleauto::EOleError(Ident, Args, Args_Size, AHelpContext) { }
  142.     
  143. public:
  144.     /* TObject.Destroy */ __fastcall virtual ~EOleSysError(void) { }
  145.     
  146. };
  147.  
  148. class DELPHICLASS EOleException;
  149. class PASCALIMPLEMENTATION EOleException : public Oleauto::EOleError 
  150. {
  151.     typedef Oleauto::EOleError inherited;
  152.     
  153. private:
  154.     int FErrorCode;
  155.     System::AnsiString FSource;
  156.     System::AnsiString FHelpFile;
  157.     
  158. public:
  159.     __fastcall EOleException(const tagEXCEPINFO &ExcepInfo);
  160.     __property int ErrorCode = {read=FErrorCode, nodefault};
  161.     __property System::AnsiString HelpFile = {read=FHelpFile};
  162.     __property System::AnsiString Source = {read=FSource};
  163. public:
  164.     /* Exception.CreateFmt */ __fastcall EOleException(const System::AnsiString Msg, const System::TVarRec 
  165.         * Args, const int Args_Size) : Oleauto::EOleError(Msg, Args, Args_Size) { }
  166.     /* Exception.CreateRes */ __fastcall EOleException(int Ident, Extended Dummy) : Oleauto::EOleError(
  167.         Ident, Dummy) { }
  168.     /* Exception.CreateResFmt */ __fastcall EOleException(int Ident, const System::TVarRec * Args, const 
  169.         int Args_Size) : Oleauto::EOleError(Ident, Args, Args_Size) { }
  170.     /* Exception.CreateHelp */ __fastcall EOleException(const System::AnsiString Msg, int AHelpContext)
  171.          : Oleauto::EOleError(Msg, AHelpContext) { }
  172.     /* Exception.CreateFmtHelp */ __fastcall EOleException(const System::AnsiString Msg, const System::TVarRec 
  173.         * Args, const int Args_Size, int AHelpContext) : Oleauto::EOleError(Msg, Args, Args_Size, AHelpContext
  174.         ) { }
  175.     /* Exception.CreateResHelp */ __fastcall EOleException(int Ident, int AHelpContext) : Oleauto::EOleError(
  176.         Ident, AHelpContext) { }
  177.     /* Exception.CreateResFmtHelp */ __fastcall EOleException(int Ident, const System::TVarRec * Args, 
  178.         const int Args_Size, int AHelpContext) : Oleauto::EOleError(Ident, Args, Args_Size, AHelpContext) { }
  179.         
  180.     
  181. public:
  182.     /* TObject.Destroy */ __fastcall virtual ~EOleException(void) { }
  183.     
  184. };
  185.  
  186. struct TCallDesc;
  187. typedef TCallDesc *PCallDesc;
  188.  
  189. #pragma pack(push, 1)
  190. struct TCallDesc
  191. {
  192.     Byte CallType;
  193.     Byte ArgCount;
  194.     Byte NamedArgCount;
  195.     Byte ArgTypes[256];
  196. } ;
  197. #pragma pack(pop)
  198.  
  199. //-- var, const, procedure ---------------------------------------------------
  200. #define MaxDispArgs (Byte)(32)
  201. extern PACKAGE TAutomation* Automation;
  202. extern PACKAGE void __fastcall OleError(int ErrorCode);
  203. extern PACKAGE void __fastcall OleCheck(int Result);
  204. extern PACKAGE GUID __fastcall StringToClassID(const System::AnsiString S);
  205. extern PACKAGE System::AnsiString __fastcall ClassIDToString(const GUID &ClassID);
  206. extern PACKAGE GUID __fastcall ProgIDToClassID(const System::AnsiString ProgID);
  207. extern PACKAGE System::AnsiString __fastcall ClassIDToProgID(const GUID &ClassID);
  208. extern PACKAGE System::Variant __fastcall VarFromInterface(IUnknown* Unknown);
  209. extern PACKAGE IDispatch* __fastcall VarToInterface(const System::Variant &V);
  210. extern PACKAGE System::Variant __fastcall CreateOleObject(const System::AnsiString ClassName);
  211. extern PACKAGE System::Variant __fastcall GetActiveOleObject(const System::AnsiString ClassName);
  212. extern PACKAGE void __fastcall DispInvoke(IDispatch* Dispatch, PCallDesc CallDesc, Ole2::PDispIDList 
  213.     DispIDs, void * Params, System::PVariant Result);
  214. extern PACKAGE void __fastcall DispInvokeError(int Status, const tagEXCEPINFO &ExcepInfo);
  215. extern PACKAGE int __stdcall DllGetClassObject(const GUID &CLSID, const GUID &IID, void *Obj);
  216. extern PACKAGE int __stdcall DllCanUnloadNow(void);
  217. extern PACKAGE int __stdcall DllRegisterServer(void);
  218. extern PACKAGE int __stdcall DllUnregisterServer(void);
  219.  
  220. }    /* namespace Oleauto */
  221. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  222. using namespace Oleauto;
  223. #endif
  224. //-- end unit ----------------------------------------------------------------
  225. #endif    // OleAuto
  226.